from typing import List
from fastapi import File,UploadFile

from app.service import public_service
from app.core.base_response import BaseResponse

async def create_upload_file(file: UploadFile = File(...), ):
    data = await public_service.upload_one(file)
    return BaseResponse.success(data=data)

async def create_upload_more(files: List[UploadFile] = File(...)):
    await public_service.upload_more(files)
    return BaseResponse.success()